Call rtezrequest("There are " || NumberOffiles || " selected file(s)." || lf || lf || "Extract file(s) with full path?", "_Yes|_No|_Extract as...|_Cancel","LhA-Control V2.4","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
Busy Off
If RTResult = 0 Then Signal WaitForSignal
Busy On
If RTResult = 3 Then Signal ExtractAs
TopText 'Building list over file(s) to extract...'
Open('Selected',TmpFiles,'W')
Do Subject = 1 to NumberOfFiles
SelectEntry Word(AllFiles,Subject) 0 1
GetEntry Word(AllFiles,Subject)+1
WriteLn('Selected','"'WildCard(Result)'"')
End Subject
Extract: Close('Selected')
TopText 'Extracting selected file(s)...'
Status 13 1-ActiveWin
Path = Result
If RTResult = 1 Then
Address Command LhA' x -a -qIM -Qw "'CurrentPath || SourceArc'" "@'TmpFiles'" "'Path'"'
Else
Address Command LhA' e -a -qIM -x2 -Qw "'CurrentPath || SourceArc'" "@'TmpFiles'" "'Path'"'
Delete(TmpFiles)
ReScan 1-ActiveWin
Busy Off
Signal WaitForSignal
ExtractAs: TopText "Extracting and renaming file(s)..."
Busy On
Subject=0
GoLoop: Busy On
SelectEntry Word(AllFiles,Subject+1) 0 1
GetEntry Word(AllFiles,Subject+1)+1
Name = Result
TstName = Substr(Name,LastPos("/",Name)+1)
Status 13 1-ActiveWin
Path = Result
Call rtgetstring(Name,"(Use '/' in name for dir creation.)" || lf lf || "Enter New File Name:","LhA-Control V2.4","_Extract|_Skip","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
Altered = Result
If RTResult = 0 Then Signal FuncCanceled
Busy On
If Exists(Path || Altered) = 1 Then Address Command 'C:Delete "'Path || WildCard(Altered)'"'
Call MakeNeededDir Altered
If Exists(Path || TstName) = 0 Then
Do
Address Command LhA' e -a -qIM -x2 -Qw "'CurrentPath || SourceArc'" "'WildCard(Name)'" "'Path'"'
Address Command 'C:Rename "'Path || WildCard(TstName)'" To "'Path || Altered'"'
End
Else
Do
Address Command LhA' e -a -qIM -x2 -Qw "'CurrentPath || SourceArc'" "'WildCard(Name)'" "'TmpPath'"'
If Altered = WildCard(Altered) Then
Do
Address Command 'C:Copy "'TmpPath || WildCard(TstName)'" To "'Path || Altered'"'
Call rtezrequest("The file has been changed." || lf || "Would you like to update it?","_Sure!|_Forget it!","LhA-Control V2.4", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
Call rtezrequest("The file has been changed." || lf || "Would you like to update it?","_Sure!|_Forget it!","LhA-Control V2.4", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
FindAtr: If left(NoWild,1) = '@' Then NoWild = Insert('*',NoWild,0)
Return NoWild
End: Status 21 ActiveWin set 9
Address Command 'C:Assign "Used By Duff:" Remove'
Address Command 'C:Delete "'Left(TmpPath,Length(TmpPath)-1)'" All NoReq >NIL:'
Busy Off
Exit
Fuser: Call rtezrequest("No file have been selected.","I see","LhA-Control V2.4", "RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
Exit
NotALhAFile: Call rtezrequest("Sorry, but this doesn't seem to be a LhA file.","hmmrf","LhA-Control V2.4", "RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
Exit
AllReady: Call rtezrequest("Sorry, but LhA-Control can't be runned twice!" || lf || "Should I quit the other LhA-Ctrl.","_Quit other|_No, commit suicide","LhA-Control V2.4", "RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
If RTResult = 0 Then Exit
Else
Address 'MouseActions' q
BeSure: Address Command 'C:Wait 1'
If Show('p','MouseActions') = 0 Then Return
Signal BeSure
Return BackToBase
SecretPart: Busy On
Call rtezrequest("LhA-Control V2.4 is ⌐ 11-Nov-94 by D&D Productions." lf lf "This is only the demo version of this fabulous ARexx script," lf "to achieve the real version send me:" lf lf "Bug reports, own productions, suggestions or gift's!" lf "(Don't forget to include a disk)" lf "It should be sent to:" lf "Allan 'Duff' Odgaard" lf "Classensgade 25A, 1th," lf "DK-2100 Copenhagen," lf "Denmark." lf lf "Bye the way, I love Asm-One V100 by Detron!!!","I'll do that!","You found the secret about window!!!","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
Busy Off
Status 3 set ActiveWin
SelectEntry 0 0 1
Signal WaitForSignal
Syntax: Beep
Status 21 ActiveWin set 9
Address Command 'C:Assign "Used By Duff:" Remove'
Address Command 'C:Delete "'Left(TmpPath,Length(TmpPath)-1)'" All NoReq'
Busy Off
TopText "Syntax Error" rc"," errortext(rc) "in line" sigl"."